package com.bluedot.www.core.utils;

import com.spire.ms.System.Collections.Generic.List;

import java.io.IOException;
import java.io.InputStream;

/**
 * 公共工具类
 *
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/8/8 16:47
 */
public class CommonUtil {

    public static boolean isEmpty(String str) {
        return str == null || str.equals("");
    }

    /**
     * 重置输入流
     * @param list: 输入流集合
     * @author He Peng
     * @date 2021/10/29 11:00
     */
    public static void resetInputStreams(List<InputStream> list) {
        for (InputStream inputStream : list) {
            if (inputStream.markSupported()) {
                try {
                    inputStream.reset();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
